package com.shop.czlmshop.controller;

import com.shop.czlmshop.pojo.User;
import com.shop.czlmshop.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @version: V1.0
 * @author: xmy
 * @className: UserController
 * @description: 用户控制器
 * @data: 2019-05-06 16:53
 **/
@Controller
public class UserController {

    @Autowired
    private UserService userService;

    /**
     * @param user
     * @description: 新增用户
     * @param: User
     * @return: int
     * @auther: XMY
     * @date: 2019-05-06 16:51
     */
    @RequestMapping("/addUser")
    public int addUser(User user) {
        return userService.addUser(user);
    }
}
